package com.lzy.cloud.search.client.service;

import com.lzy.cloud.search.client.entity.EsQuery;
import org.elasticsearch.action.search.SearchResponse;

/**
 * Created by WIN7 on 2018/5/23.
 */
public interface FullTextQueriesService {
    /**
     * 最简单的查询 匹配所有文档
     * @param esQuery
     * @return
     * @throws Exception
     */
    SearchResponse matchAllQuerys(EsQuery esQuery);
    /**
     * 用于执行全文查询的标准查询，包括模糊匹配和词组或邻近程度的查询
     * @param esQuery
     * @return
     * @throws Exception
     */
    SearchResponse matchQuerys(EsQuery esQuery) ;

    /**
     * 多个字段查询
     *
     * @return
     * @throws Exception
     */
    SearchResponse multiMatchQuerys(EsQuery esQuery) ;

    /**
     * 常用词查询
     * @param esQuery
     * @return
     * @throws Exception
     */
    SearchResponse commonTermsQuerys(EsQuery esQuery);
}
